<template>
  <div>
    Home quankun

    <ul>
      <li v-for="item in user">
        <div>
          <span>名字:{{ item.username }}</span
          >&nbsp;&nbsp; <span>电话:{{ item.tel }}</span
          >&nbsp;&nbsp; <span>用户id:{{ item.userid }}</span
          >&nbsp;&nbsp; <span>用户等级:{{ item.star }}</span
          >&nbsp;&nbsp;
        </div>
      </li>
    </ul>

    <div>
      <textarea
        cols="1"
        rows="1"
        class="area"
        v-model="text"
        placeholder=""
      ></textarea>
    </div>
    <keyword></keyword>
  </div>
</template>
<script>
import axios from "axios";
import keyword from "../components/keyword";
export default {
  components: { keyword },
  name: "Home",
  data() {
    return {
      user: [],
      text: "",
    };
  },
  methods: {
    a() {
      axios.post("http://localhost:8080/goods/goodAll").then((res) => {
        console.log("goodAll", res);
      });
    },
    b() {
      axios.get("http://localhost:8080/user/users").then((res) => {
        console.log("user", res);
        this.user = res.data.user;
      });
    },
  },
  mounted() {
    this.a();
    this.b();
  },
};
</script>
<style>
/* textarea {
  width: 280px;
  height: 144px;
  outline: none;
  overflow-y: scroll;
  background: #f5f6f7;
  border: none;
} */

textarea {
  width: 280px;
  height: 144px;
  overflow: scroll;
  resize: none;
  background: #f5f6f7;
  border: none;
}
.area {
  outline: none;
  overflow-x: hidden;
}
/* .area {
} */
</style>